home *** CD-ROM | disk | FTP | other *** search
/ Acorn User: China / Acorn User China CD-ROM (UK) (Disc B) / Acorn User China CD-ROM (UK) (Disc B).bin / STUTTGART / FROMUTS / UNIXLIB37B / src_c_atexit < prev    next >
Encoding:
C/C++ Source or Header  |  1990-10-01  |  317 b   |  18 lines

  1. #ifdef __STDC__
  2. static char sccs_id[] = "@(#) atexit.c 2.1 "__DATE__" HJR";
  3. #else
  4. static char sccs_id[] = "@(#) atexit.c 2.1 26/9/90 HJR";
  5. #endif
  6.  
  7. /* atexit.c (c) Copyright 1990 H.Rogers */
  8.  
  9. #include <stdlib.h>
  10.  
  11. int atexit(register void (*f)(void))
  12. {
  13. if (__axcnt >= 32) return(-1);
  14.  
  15. __ax[__axcnt++] = f;
  16. return(0);
  17. }
  18.